import Mock from 'mockjs'
// import MockAdapter from 'axios-mock-adapter';
import axios from 'axios';

const announceList = [
    {
        id:1,
        newscontent:'<h1>我是谁？</h1>'
    },
    {
        id:2,
        newscontent:'<h1>我是谁？</h1>'
    },
    {
        id:3,
        newscontent:'<h1>我是谁？</h1>'
    }
  ]
  
  const queryAnnounceSuccess = {
    code:0,
    msg:'请求成功',
    announceList
  }
  // const mock = new MockAdapter(axios);
  // Mock.onPost('/xju/announce').reply((config)=>{
  //   // console.log(config.data);
  //   return queryAnnounceSuccess;
  // });

  Mock.mock(/\/xju\/announce/, 'post', options => {
    return queryAnnounceSuccess
  })